package com.codedancer.campus.po;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@TableName(value = "lost_found_item_comment", autoResultMap = true)
@Table(name = "lost_found_item_comment", comment = "失物招领物品评论表")
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class LostFoundItemComment {

    @TableId
    @TableField("uuid")
    @Column(name = "uuid", type = MySqlTypeConstant.VARCHAR, length = 36, isKey = true, isNull = false, comment = "uuid")
    private String uuid;

    @TableField("parent_uuid")
    @Column(name = "parent_uuid", type = MySqlTypeConstant.VARCHAR, length = 36, defaultValue = "0", isNull = false, comment = "评论父级uuid")
    private String parentUuid;

    @TableField("lost_found_item_uuid")
    @Column(name = "lost_found_item_uuid", type = MySqlTypeConstant.VARCHAR, length = 36, isNull = false, comment = "物品uuid")
    private String lostFoundItemUuid;

    @TableField("comment_user_uuid")
    @Column(name = "comment_user_uuid", type = MySqlTypeConstant.VARCHAR, length = 36, isNull = false, comment = "评论用户uuid")
    private String commentUserUuid;

    @TableField("reply_user_uuid")
    @Column(name = "reply_user_uuid", type = MySqlTypeConstant.VARCHAR, length = 36, isNull = false, comment = "回复用户uuid")
    private String replayUserUuid;

    @TableField("content")
    @Column(name = "content", type = MySqlTypeConstant.TEXT, isNull = false, comment = "评论内容")
    private String content;

    @Column(name = "create_time", type = MySqlTypeConstant.DATETIME, isNull = false, comment = "创建时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @Column(name = "update_time", type = MySqlTypeConstant.DATETIME, isNull = false, comment = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
}
